#!/usr/bin/python
import hmmtop
import blast
import gsat
import ssearch
import tss
import tms_compare
import tms_p2
#import superfamilytms
import os
import re
import sys
from biotools import *

print "====== Welcome to the SaierLab Biotools Enviornment ========"
print "# http://www.tcdb.org/discuss (instructions)\n"
print "# Please choose a working directory name. This will be created"
print "# Under desktop/Biotools/YourName - Please enter a new or "
print "# Existing name name here to begin working. No spaces or non"
print "# Alpha-numeric characters please."

wd = raw_input("Directory Name: ")
if bool(re.search('[^A-Za-z0-9-_]',wd)) is True or len(wd) is 0:
	print "Invalid Directory name. Biotools is quitting"
	sys.exit()
home = os.getenv('HOME')+'/Desktop/Biotools/'
try:
	os.chdir(home+wd)
except:
	os.makedirs(home+wd)
	os.chdir(home+wd)
	print "> Your personal directory has been created on Desktop/Biotools/"+wd
	print "> Please remember this directory, and use the same one to avoid clutter"